//
//  PBRect.h
//  PlatinumButler
//
//  Created by 高小松 on 14-4-2.
//  Copyright (c) 2014年 gxsoft. All rights reserved.
//

#import <Foundation/Foundation.h>

#ifdef __cplusplus
extern "C" {
#endif
    
    void OffsetRectToXY(CGRect* lpRect, float x, float y);
    void OffsetRectToPoint(CGRect* lpRect, CGPoint point);
    void OffsetRectX(CGRect* lpRect, float x);
    void OffsetRectY(CGRect* lpRect, float y);
    void OffsetRect(CGRect* lpRect, float x, float y);
    void InflateRect(CGRect* lpRect, float left, float top, float right, float bottom);
    void DeflateRect(CGRect* lpRect, float left, float top, float right, float bottom);
    void InflateRectXY(CGRect* lpRect, float x, float y);
    void DeflateRectXY(CGRect* lpRect, float x, float y);
    void DeflateRectInset(CGRect* lpRect, UIEdgeInsets insets);
    
    CGPoint CenterPoint(CGRect rect);
    CGPoint LeftTopPoint(CGRect rect);
    CGPoint LeftButtomPoint(CGRect rect);
    CGPoint RightTopPoint(CGRect rect);
    CGPoint RightBottomPoint(CGRect rect);
    
    CGRect CenterRect(CGRect rect, float width, float height);
    CGRect CenterRectForBounds(CGRect rect, CGRect bounds);
    CGRect LeftRect(CGRect rect, float width, float offset);
    CGRect RightRect(CGRect rect, float width, float offset);
    CGRect TopRect(CGRect rect, float height, float offset);
    CGRect BottomRect(CGRect rect, float height, float offset);
    
    CGRect LeftTopRect(CGRect rect, float width, float height);
    CGRect LeftBottomRect(CGRect rect, float width, float height);
    CGRect RightTopRect(CGRect rect, float width, float height);
    CGRect RightBottomRect(CGRect rect, float width, float height);
    
    CGRect LeftCenterRect(CGRect rect, float width, float height, float offset);
    CGRect RightCenterRect(CGRect rect, float width, float height, float offset);
    CGRect TopCenterRect(CGRect rect, float width, float height, float offset);
    CGRect BottomCenterRect(CGRect rect, float width, float height, float offset);
    
    CGRect ScaleRectFromRect(CGRect rect, CGFloat scale);
    CGRect RectFromScaleRect(CGRect rect, CGFloat scale);
    
#ifdef __cplusplus
}
#endif
